<style lang="less" scoped>
.input {
  position: absolute;
  top: 50%;
  left: 1%;
  transform: translateY(-50%);
  width: 200px;
  // border: 1px solid #ccc;
  // box-shadow: 0 0 4px 2px #ccc;
}
</style>
<template>
  <div class="input">
    <el-input
      v-model="inputData.val"
      @input="setInputData(inputData)"
      placeholder="输入数据"
    ></el-input>
  </div>
</template>

<script>
import { mapMutations } from "vuex";
export default {
  data() {
    return {
      inputData: {
        name: "testInput",
        val: "",
      },
    };
  },
  methods: {
    ...mapMutations("inputModule", ["setInputData"]),
  },
  //生命周期 - 创建完成
  created() {},
  //DOM挂载完毕
  mounted() {},
};
</script>
